package com.china08.yxyapi.repository.mg.mistakes;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.mistakes.TeaMistakesQues;

public interface TeaMistakesQuesRepository extends MongoRepository<TeaMistakesQues, String> {

    Page<TeaMistakesQues> findByClassIdAndPublishUserIdAndKnowIdLstInAndQuestionTypeInAndStatusIn(String classId,
            String publishUserId, List<Integer> knowIdLst, List<String> questionType, List<Integer> status,
            Pageable pageable);

    Page<TeaMistakesQues> findByClassIdAndPublishUserIdAndKnowIdLstInAndQuestionTypeNotInAndStatusIn(String classId,
            String publishUserId, List<Integer> knowIdLst, List<String> questionType, List<Integer> status,
            Pageable pageable);

    Integer countByClassIdAndPublishUserIdAndKnowIdLstIn(String classId, String publishUserId, List<Integer> knowIdLst);

    Integer countByPublishUserIdAndKnowIdLstIn(String publishUserId, List<Integer> knowIdLst);
}
